Conversation
6c2b6c5 to
a594c75
Compare
85e4dfe to
1322c80
Compare
2bb4c49 to
7e69125
Compare
7cdfb0a to
ca310cd
Compare
fix(client): mark some request bodies as optional
3bdb00f to
3ad7f25
Compare
1be6ce9 to
97b7254
Compare
35a4088 to
bc25b84
Compare
ef0d130 to
08062c4
Compare
9257acd to
b41543a
Compare
df1d708 to
69a44e3
Compare
cf36bae to
bba1424
Compare
e0b03f0 to
3d90dff
Compare
84a0625 to
db19786
Compare
359644d to
21a20b3
Compare
f7c66f3 to
f0262a9
Compare
f0262a9 to
3524f04
Compare
3524f04 to
9bd1046
Compare
9bd1046 to
f263f8c
Compare
f263f8c to
5cddd6f
Compare
5cddd6f to
590d7c8
Compare
590d7c8 to
07aac58
Compare
07aac58 to
d01a3f6
Compare
d01a3f6 to
1e2a487
Compare
1e2a487 to
1efa099
Compare
1efa099 to
d60e2bc
Compare
d60e2bc to
2df8211
Compare
| line-length = 120 | ||
| output-format = "grouped" | ||
| target-version = "py37" | ||
| target-version = "py38" |
There was a problem hiding this comment.
Ruff target-version inconsistent with minimum Python version
Low Severity
The ruff target-version was changed from "py37" to "py38", but the project's requires-python was updated to ">= 3.9" and pyright's pythonVersion is set to "3.9". The ruff target should be "py39" to match. This inconsistency means ruff applies formatting/linting rules for Python 3.8 compatibility even though the project no longer supports it — for example, the FA102 rule may unnecessarily flag missing from __future__ import annotations in files that only need 3.9+ support.
Additional Locations (2)
2df8211 to
74bef2f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| request = self._build_request(options, retries_taken=retries_taken) | ||
| self._prepare_request(request) | ||
| retries_taken = 0 | ||
| for retries_taken in range(max_retries + 1): |
There was a problem hiding this comment.
Iterative retry loop breaks math.inf unlimited retries
Medium Severity
The refactored retry logic uses range(max_retries + 1) which crashes with TypeError when max_retries is math.inf, since range() requires integer arguments. The old recursive approach handled this correctly because it only compared remaining_retries > 0. The error message in __init__ still explicitly recommends math.inf for unlimited retries, making this a documented-but-broken feature.


Automated Release PR
4.1.0 (2026-02-12)
Full Changelog: v4.0.0...v4.1.0
Features
NotGivenfor body (#67) (3ad7f25)X-Stainless-Read-Timeoutheader (#63) (a594c75)Bug Fixes
model_dumpandmodel_dump_jsonfor Pydantic v1 (898ca7b)Chores
httpx-aiohttpversion to 0.1.9 (7aeb4c8)actions/github-script(bdad5ed)--fixargument to lint script (0b1e68e)pyproject.tomlfile (f87b268)actions/checkoutversion (54d6bd9)get_platformtest (ef07d85)Documentation
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions
Note
Medium Risk
Touches core request construction/retry/streaming and packaging/runtime compatibility (Python floor + optional aiohttp transport), which could subtly change HTTP behavior or break integrations despite being mostly additive.
Overview
Releases v4.1.0: bumps package/version metadata, updates changelog, and raises the supported floor to Python 3.9+ (plus new 3.13/3.14 classifiers and updated lockfiles/dependencies).
Extends the HTTP client layer with optional
aiohttptransport (DefaultAioHttpClient+aiohttpextras), raw/binary request bodies via a newcontentparameter, follow-redirects support, and more robust request/response behavior (iterative retry loop, idempotency-key reuse,X-Stainless-Read-Timeoutheader, relaxed JSON content-type detection, SSE streams closing on early exit, and pagination support for JSON-body based requests).Modernizes developer tooling and CI: upgrades Rye and GitHub Actions, adds a CI
buildjob that can upload built wheels via OIDC, runs tests in parallel, movesmypyconfig intopyproject.toml, tweaks bootstrap/lint scripts, updates devcontainer/VS Code settings, and refreshes docs/URLs and release scripts (including updated Prism CLI usage).Written by Cursor Bugbot for commit 74bef2f. This will update automatically on new commits. Configure here.